<table class="form">
	<thead>
		<tr><th colspan="2" class="title">Opções da Enquete</th></tr>
		<tr>
			<td><a href="javascript:void(0);" id="clone_file">+ Adicionar opção</a></td>
		</tr>
	</thead>
	<tbody>
		<tr>
			<td>
				<table id="cloner" class="form">
					<?php $i = 0; ?>
					<?php foreach($form->getObject()->getEnqueteOpcao() as $name => $opcao): ?>
					<tr>
						<td>
							<?php 
								echo input_tag(
									'enquete_opcao[]['.$opcao->getIdEnqueteOpcao().']', 
									$opcao->getDsOpcao(),
									array(
										'size' => 50,
										'data-id' => $opcao->getIdEnqueteOpcao()
									)
								);
							?>
						</td>
					</tr>
					<?php $i++; endforeach; ?>
				</table>
			</td>
		</tr>
	<tbody>
</table>

<script type="text/javascript">
$(function(){
	var i = "<?php echo (count($opcoes))? $i : '1'; ?>";
    $("#clone_file").click(
    	function(){
            $("#cloner").append("<tr><td><input type='text' name='enquete_opcao[new][]' size='50'></td></tr>");
        }
    );
});
</script>